package com.supermarket_project.mapper;

import com.supermarket_project.pojo.Goods;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * (Goods)表数据库访问层
 *
 * @author makejava
 * @since 2022-07-08 16:08:31
 */
@Repository
public interface GoodsMapper{

    int addGoods(Goods goods);

    List<Goods> pageGoods(@Param("gCategoryId") Integer gCategoryId,
                          @Param("goodsName") String goodsName,
                          @Param("barcode") String barcode);

    int updateGoods(Goods goods);

    Goods queryGoods(int goodsId);

    int deleteGoods(int goodsId);

    int lockGoods(int goodsId, int status);

    List<Goods> queryGoodsByCategoryId(Integer gCategoryId);
}

